// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
// import * as adapter from 'webrtc-adapter'
import Vue from 'vue'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'
import 'webrtc-adapter'
// import VueSocketio from 'vue-socket.io'
import VueResource from 'vue-resource'
import store from './store'
import App from './AppRTC'

Vue.use(VueMaterial)
Vue.use(VueResource)
Vue.material.theme.register('default', {
  primary: 'cyan',
  accent: 'pink'
})
// Vue.use(VueSocketio, '/')

/* eslint-disable */
Vue.directive('stream',{
    update(el,binding){
        console.log(binding);
        //binding.value && (el.src = URL.createObjectURL(binding.value));
        el.srcObject = binding.value;
    }
});

new Vue({
  el: '#app',
  template: '<App/>',
  components: { App },
  store
})